﻿@using Super.Mvc
@using Zen.Barcode
@model Super.Entities.DiyOrder
@{
    ViewBag.Title = "购买订单";
    var DiyComp = (List<DiyComponentsList>)ViewBag.DiyComp;
}
@using (Html.AjaxBeginForm("buy", "diy"))
{
    <div class="pageFormContent" layouth="56">
        @Html.HiddenFor(a => a.ID)
        @Html.DWZTextBoxFor(a => a.OrderNo, "订单编号")
        <p><label>装机分类：</label>
            @{
    var show = typeof(DiyOrderTypeEnum).GetItemShow(Model.Type);
                <input type="text" value="@show" disabled="disabled"/>
                               
            }
        </p>
        @Html.DWZTextBoxFor(a => a.Name, "订单名称").Required()
        <div class="divider">
        </div>
        @Html.DWZTextBoxFor(a => a.Price, "原价").Disable()
        <div class="divider">
        </div>
        @Html.DWZTextBoxFor(a => a.PayMoney, "支付金额").Required()
        <div class="divider">
        </div>
        <p style="width: 700px">
            <label>装机用户：</label> 
            <input name="user.ID" value="" type="hidden" /> 
            <input class="required" name="user.Name" type="text" suggestfields="ID,Name" suggesturl="/admin/user/subsearch" lookupgroup="user" lookuppk="ID" /> 
            <a class="btnLook" href="/admin/user/subsearch" lookupgroup="user" lookuppk="ID">查找带回</a> <span class="info">(点击选择用户)</span> 
        </p>
        <div class="divider">
        </div>
        @Html.DWZTextAreaFor(a => a.Remark, "备注", new { cols = 50, rows = 4 })
        @Html.TextBoxFor(a => a.CreateTime, new { type = "hidden" })
        <div class="divider">
        </div>
        <span style="color: red; font-weight: bold; font-size: 18px;">配件列表：</span>
        <div class="divider">
        </div>
        @{
            foreach (var item in DiyComp)
            {
                    <p><label>@item.Product.ProductCategory.Name :</label> <input type="text" value="@item.Product.Title" style=" width: 270px" /> </p>
                    <p style="width: 520px;"><label>保修时间：</label> <input type="text" value="@(item.Warrant)" name="bx@(item.ID)"/> <span>【单位：月】</span> </p>
                    <div class="divider">
                    </div>
  
            }
  
        }
    </div>
    @Html.DWZFormBar()
}
<style type="text/css">
    .pageFormContent p { width: 480px; }
    .gridScroller { height: 200px; }
</style>
